home *** CD-ROM | disk | FTP | other *** search
/ Apple WWDC 1996 / WWDC96_1996 (CD).toast / Technology Materials / MacOS 8 Resources / Developer Tools / Mac OS 8 Interfaces & Libraries / Interfaces / CIncludes / TSMCollation.xh < prev    next >
Text File  |  1996-05-01  |  16KB  |  570 lines

  1.  
  2. /*
  3.  * This file was generated by the SOM Compiler.
  4.  * FileName: TSMCollation.xh.
  5.  * Generated using:
  6.  *     SOM Precompiler somipc: 2.18
  7.  *     SOM Emitter emitxh.dll: 2.33
  8.  */
  9.  
  10. #ifndef SOM_TSMCollation_xh
  11. #define SOM_TSMCollation_xh
  12.  
  13. class TSMCollation;
  14.  
  15. #define TSMCollation_MajorVersion 1
  16. #define TSMCollation_MinorVersion 1
  17.  
  18. /* C++ SOM defs */
  19. #include <somcls.xh>
  20. #include <somcm.xh>
  21.  
  22. /* C++ parent defs */
  23. #ifndef SOM_TSMObject_xh
  24. #include <TSMObject.xh>
  25. #endif
  26.  
  27. #ifndef TSMCollation_API
  28. #define TSMCollation_API
  29. /*
  30.  * -- The Class API
  31.  */
  32.  
  33. /*
  34.  * Start of user-defined types:
  35.  */
  36. class SOMClass;
  37. class SOMObject;
  38. class HIWindow;
  39. class HIEmbeddingPanel;
  40.  
  41. /*
  42.  * End of user-defined types.
  43.  */
  44.  
  45. #ifdef OLDIBMSOMAPISUPPORT
  46. #define TSMCollationCClassData TSMCollationClassData
  47. #define TSMCollationNewClass(major,minor) somNewVersionedClassReference(TSMCollation,major,minor)
  48. #endif
  49.  
  50. /* define xxxMetaClass macro to facilitate (cls ## MetaClass) */
  51. #define TSMCollationMetaClass SOMClass
  52.  
  53. #if PRAGMA_ALIGN_SUPPORTED
  54. #  pragma options align=power
  55. #endif
  56.  
  57. /* The API to the TSMCollation class object, and the methods it introduces. */
  58. SOMEXTERN struct TSMCollationClassDataStructure {
  59. #ifdef OLDIBMSOMAPISUPPORT
  60.     SOMClass            *classObject;    /* always zero, use somNewClassReference instead */
  61. #else
  62.     long zero;
  63. #endif
  64.     somStaticClassInfo *sci;
  65.     somDToken        instanceDataToken;
  66.     long reserved [3];
  67.     somMToken DoCollationProcessText;
  68. } SOMDLINK TSMCollationClassData;
  69.  
  70. #if PRAGMA_ALIGN_SUPPORTED
  71. #  pragma options align=reset
  72. #endif
  73.  
  74. #if !defined(TSMCollation_Class_Source) && !defined(SOM_Module_tsmcollation_Source)
  75. #if PRAGMA_IMPORT_SUPPORTED
  76. #pragma import list TSMCollationClassData
  77. #endif
  78. #endif
  79.  
  80.  
  81. /*
  82.  * -- Typedefs for TSMCollation Method Procedures
  83.  */
  84. SOMEXTERN {
  85. typedef OSStatus   (* SOMLINK somTD_TSMCollation_DoCollationProcessText)(TSMCollation *somSelf, Environment *ev,
  86.         CollationRef collationRef,
  87.         CollateOptions options,
  88.         ConstTextObject text,
  89.         TextObjectIndex startIndex,
  90.         TextObjectIndex endIndex,
  91.         TextObject result);
  92.  
  93. /*
  94.  * -- Typedefs for Inherited Methods
  95.  */
  96. typedef TSMContext   (* SOMLINK somTD_TSMCollation__get_fTSMContext)(TSMCollation *somSelf, Environment *ev);
  97. typedef void   (* SOMLINK somTD_TSMCollation__set_fTSMContext)(TSMCollation *somSelf, Environment *ev,
  98.         TSMContext fTSMContext);
  99. typedef OSStatus   (* SOMLINK somTD_TSMCollation__get_fStatus)(TSMCollation *somSelf, Environment *ev);
  100. typedef void   (* SOMLINK somTD_TSMCollation__set_fStatus)(TSMCollation *somSelf, Environment *ev,
  101.         OSStatus fStatus);
  102. typedef TSMServiceContextRef   (* SOMLINK somTD_TSMCollation__get_fServiceContext)(TSMCollation *somSelf, Environment *ev);
  103. typedef void   (* SOMLINK somTD_TSMCollation__set_fServiceContext)(TSMCollation *somSelf, Environment *ev,
  104.         TSMServiceContextRef fServiceContext);
  105. typedef OSStatus   (* SOMLINK somTD_TSMCollation_InitializeService)(TSMCollation *somSelf, Environment *ev);
  106. typedef OSStatus   (* SOMLINK somTD_TSMCollation_TerminateService)(TSMCollation *somSelf, Environment *ev);
  107. typedef OSStatus   (* SOMLINK somTD_TSMCollation_ServiceChanged)(TSMCollation *somSelf, Environment *ev);
  108. typedef OSStatus   (* SOMLINK somTD_TSMCollation_EditInlineHole)(TSMCollation *somSelf, Environment *ev,
  109.         AppleEvent* theEvent);
  110. typedef OSStatus   (* SOMLINK somTD_TSMCollation_FeatureChanged)(TSMCollation *somSelf, Environment *ev,
  111.         UInt32 theType);
  112. typedef OSStatus   (* SOMLINK somTD_TSMCollation_ActivateService)(TSMCollation *somSelf, Environment *ev);
  113. typedef OSStatus   (* SOMLINK somTD_TSMCollation_DeactivateService)(TSMCollation *somSelf, Environment *ev);
  114. typedef OSStatus   (* SOMLINK somTD_TSMCollation_ServiceMouseEvent)(TSMCollation *somSelf, Environment *ev,
  115.         Point* mousePos,
  116.         KeyboardModifiers Modifiers,
  117.         UInt32 when,
  118.         UInt32 theEventType,
  119.         AppleEvent* event);
  120. typedef OSStatus   (* SOMLINK somTD_TSMCollation_ServiceKeyEvent)(TSMCollation *somSelf, Environment *ev,
  121.         KeyboardModifiers Modifiers,
  122.         VirtualKeyCode theKeyCode,
  123.         VirtualKeyCode theCharCode,
  124.         AppleEvent* event);
  125. typedef OSStatus   (* SOMLINK somTD_TSMCollation_ServiceWindowEvent)(TSMCollation *somSelf, Environment *ev,
  126.         HIWindow* theWindow,
  127.         UInt32 theEventType,
  128.         AppleEvent* event);
  129. typedef OSStatus   (* SOMLINK somTD_TSMCollation_HideServiceWindows)(TSMCollation *somSelf, Environment *ev);
  130. typedef OSStatus   (* SOMLINK somTD_TSMCollation_DoSetCursor)(TSMCollation *somSelf, Environment *ev,
  131.         Point* mousePos,
  132.         RegionClass rgnClass,
  133.         ByteOffset offset,
  134.         boolean isLeftHand,
  135.         AppleEvent* theEvent);
  136. typedef OSStatus   (* SOMLINK somTD_TSMCollation_ReleaseInlineHoles)(TSMCollation *somSelf, Environment *ev);
  137. typedef OSStatus   (* SOMLINK somTD_TSMCollation_TerminateInput)(TSMCollation *somSelf, Environment *ev);
  138. typedef void   (* SOMLINK somTD_TSMCollation_somInit)(TSMCollation *somSelf);
  139. typedef void   (* SOMLINK somTD_TSMCollation_somUninit)(TSMCollation *somSelf);
  140. typedef SOMObject*   (* SOMLINK somTD_TSMCollation_somDuplicateReference)(TSMCollation *somSelf);
  141. typedef boolean   (* SOMLINK somTD_TSMCollation_somCompareReference)(TSMCollation *somSelf,
  142.         SOMObject* anObject);
  143. typedef SOMObject*   (* SOMLINK somTD_TSMCollation_somRelease)(TSMCollation *somSelf);
  144. typedef void   (* SOMLINK somTD_TSMCollation_somFree)(TSMCollation *somSelf);
  145. typedef boolean   (* SOMLINK somTD_TSMCollation_somCanDelete)(TSMCollation *somSelf);
  146. typedef SOMClass*   (* SOMLINK somTD_TSMCollation_somGetClass)(TSMCollation *somSelf);
  147. typedef corbastring   (* SOMLINK somTD_TSMCollation_somGetClassName)(TSMCollation *somSelf);
  148. typedef long   (* SOMLINK somTD_TSMCollation_somGetSize)(TSMCollation *somSelf);
  149. typedef boolean   (* SOMLINK somTD_TSMCollation_somIsA)(TSMCollation *somSelf,
  150.         SOMClass* aClassObj);
  151. typedef boolean   (* SOMLINK somTD_TSMCollation_somRespondsTo)(TSMCollation *somSelf,
  152.         somId mId);
  153. typedef boolean   (* SOMLINK somTD_TSMCollation_somIsInstanceOf)(TSMCollation *somSelf,
  154.         SOMClass* aClassObj);
  155. typedef boolean   (* SOMLINK somTD_TSMCollation_somDispatch)(TSMCollation *somSelf,
  156.         somToken* retValue,
  157.         somId methodId,
  158.         va_list ap);
  159. typedef boolean   (* SOMLINK somTD_TSMCollation_somClassDispatch)(TSMCollation *somSelf,
  160.         SOMClass* clsObj,
  161.         somToken* retValue,
  162.         somId methodId,
  163.         va_list ap);
  164. typedef boolean   (* SOMLINK somTD_TSMCollation_somCastObj)(TSMCollation *somSelf,
  165.         SOMClass* cls);
  166. typedef boolean   (* SOMLINK somTD_TSMCollation_somResetObj)(TSMCollation *somSelf);
  167. typedef SOMObject*   (* SOMLINK somTD_TSMCollation_somPrintSelf)(TSMCollation *somSelf);
  168. typedef void   (* SOMLINK somTD_TSMCollation_somDumpSelf)(TSMCollation *somSelf,
  169.         long level);
  170. typedef void   (* SOMLINK somTD_TSMCollation_somDumpSelfInt)(TSMCollation *somSelf,
  171.         long level);
  172. }
  173.  
  174. #endif /* TSMCollation_API */
  175.  
  176.  
  177. /*
  178.  * -- This emitter treats Method Tokens as Thunks by default.
  179.  * -- Use the sc modifier "nothunks" to change this default
  180.  */
  181. #undef somresolve_
  182. #define somresolve_(obj,mToken) ((somMethodProc*)((void)obj, mToken))
  183.  
  184. /*
  185.  * -- The C++ Wrapper Class for TSMCollation
  186.  */
  187. class TSMCollation : public TSMObject
  188. {
  189. public:
  190.  
  191. // TSMCollation::new registers use of the class object, and then uses somNew
  192. // to allocate memory and load the object method table pointer. 
  193. void *operator new(size_t size)
  194. {
  195.     SOM_IgnoreWarning(size);
  196.     // Allocate memory using the default allocator for TSMCollation, and
  197.     // clear mem & set method table pointer, call basic initialization
  198.     return (void*) somNewObject(TSMCollation);
  199. }
  200.  
  201. // TSMCollation::delete uses the default deallocator for the object's class.
  202. void operator delete(void * obj)
  203. {
  204.     if (obj) {
  205.         SOM_Resolve(obj,SOMObject,somFree)
  206.            ( (SOMObject*) obj );
  207.     }
  208. }
  209.  
  210. /* method: DoCollationProcessText */
  211. OSStatus   DoCollationProcessText(Environment *ev,
  212.         CollationRef collationRef,
  213.         CollateOptions options,
  214.         ConstTextObject text,
  215.         TextObjectIndex startIndex,
  216.         TextObjectIndex endIndex,
  217.         TextObject result)
  218. {
  219.    return SOM_ResolveD(this,TSMCollation,TSMCollation,DoCollationProcessText)
  220.     (this,ev,collationRef,options,text,startIndex,endIndex,result);
  221. }
  222.  
  223.  
  224. /*
  225.  * -- Inherited methods
  226.  */
  227. /* method: _get_fTSMContext */
  228. TSMContext   _get_fTSMContext(Environment *ev)
  229. {
  230.    return SOM_ResolveD(this,TSMCollation,TSMObject,_get_fTSMContext)
  231.     (this,ev);
  232. }
  233.  
  234. /* method: _set_fTSMContext */
  235. void   _set_fTSMContext(Environment *ev,
  236.         TSMContext fTSMContext)
  237. {
  238.    SOM_ResolveD(this,TSMCollation,TSMObject,_set_fTSMContext)
  239.     (this,ev,fTSMContext);
  240. }
  241.  
  242. /* method: _get_fStatus */
  243. OSStatus   _get_fStatus(Environment *ev)
  244. {
  245.    return SOM_ResolveD(this,TSMCollation,TSMObject,_get_fStatus)
  246.     (this,ev);
  247. }
  248.  
  249. /* method: _set_fStatus */
  250. void   _set_fStatus(Environment *ev,
  251.         OSStatus fStatus)
  252. {
  253.    SOM_ResolveD(this,TSMCollation,TSMObject,_set_fStatus)
  254.     (this,ev,fStatus);
  255. }
  256.  
  257. /* method: _get_fServiceContext */
  258. TSMServiceContextRef   _get_fServiceContext(Environment *ev)
  259. {
  260.    return SOM_ResolveD(this,TSMCollation,TSMObject,_get_fServiceContext)
  261.     (this,ev);
  262. }
  263.  
  264. /* method: _set_fServiceContext */
  265. void   _set_fServiceContext(Environment *ev,
  266.         TSMServiceContextRef fServiceContext)
  267. {
  268.    SOM_ResolveD(this,TSMCollation,TSMObject,_set_fServiceContext)
  269.     (this,ev,fServiceContext);
  270. }
  271.  
  272. /* method: InitializeService */
  273. OSStatus   InitializeService(Environment *ev)
  274. {
  275.    return SOM_ResolveD(this,TSMCollation,TSMObject,InitializeService)
  276.     (this,ev);
  277. }
  278.  
  279. /* method: TerminateService */
  280. OSStatus   TerminateService(Environment *ev)
  281. {
  282.    return SOM_ResolveD(this,TSMCollation,TSMObject,TerminateService)
  283.     (this,ev);
  284. }
  285.  
  286. /* method: ServiceChanged */
  287. OSStatus   ServiceChanged(Environment *ev)
  288. {
  289.    return SOM_ResolveD(this,TSMCollation,TSMObject,ServiceChanged)
  290.     (this,ev);
  291. }
  292.  
  293. /* method: EditInlineHole */
  294. OSStatus   EditInlineHole(Environment *ev,
  295.         AppleEvent* theEvent)
  296. {
  297.    return SOM_ResolveD(this,TSMCollation,TSMObject,EditInlineHole)
  298.     (this,ev,theEvent);
  299. }
  300.  
  301. /* method: FeatureChanged */
  302. OSStatus   FeatureChanged(Environment *ev,
  303.         UInt32 theType)
  304. {
  305.    return SOM_ResolveD(this,TSMCollation,TSMObject,FeatureChanged)
  306.     (this,ev,theType);
  307. }
  308.  
  309. /* method: ActivateService */
  310. OSStatus   ActivateService(Environment *ev)
  311. {
  312.    return SOM_ResolveD(this,TSMCollation,TSMObject,ActivateService)
  313.     (this,ev);
  314. }
  315.  
  316. /* method: DeactivateService */
  317. OSStatus   DeactivateService(Environment *ev)
  318. {
  319.    return SOM_ResolveD(this,TSMCollation,TSMObject,DeactivateService)
  320.     (this,ev);
  321. }
  322.  
  323. /* method: ServiceMouseEvent */
  324. OSStatus   ServiceMouseEvent(Environment *ev,
  325.         Point* mousePos,
  326.         KeyboardModifiers Modifiers,
  327.         UInt32 when,
  328.         UInt32 theEventType,
  329.         AppleEvent* event)
  330. {
  331.    return SOM_ResolveD(this,TSMCollation,TSMObject,ServiceMouseEvent)
  332.     (this,ev,mousePos,Modifiers,when,theEventType,event);
  333. }
  334.  
  335. /* method: ServiceKeyEvent */
  336. OSStatus   ServiceKeyEvent(Environment *ev,
  337.         KeyboardModifiers Modifiers,
  338.         VirtualKeyCode theKeyCode,
  339.         VirtualKeyCode theCharCode,
  340.         AppleEvent* event)
  341. {
  342.    return SOM_ResolveD(this,TSMCollation,TSMObject,ServiceKeyEvent)
  343.     (this,ev,Modifiers,theKeyCode,theCharCode,event);
  344. }
  345.  
  346. /* method: ServiceWindowEvent */
  347. OSStatus   ServiceWindowEvent(Environment *ev,
  348.         HIWindow* theWindow,
  349.         UInt32 theEventType,
  350.         AppleEvent* event)
  351. {
  352.    return SOM_ResolveD(this,TSMCollation,TSMObject,ServiceWindowEvent)
  353.     (this,ev,theWindow,theEventType,event);
  354. }
  355.  
  356. /* method: HideServiceWindows */
  357. OSStatus   HideServiceWindows(Environment *ev)
  358. {
  359.    return SOM_ResolveD(this,TSMCollation,TSMObject,HideServiceWindows)
  360.     (this,ev);
  361. }
  362.  
  363. /* method: DoSetCursor */
  364. OSStatus   DoSetCursor(Environment *ev,
  365.         Point* mousePos,
  366.         RegionClass rgnClass,
  367.         ByteOffset offset,
  368.         boolean isLeftHand,
  369.         AppleEvent* theEvent)
  370. {
  371.    return SOM_ResolveD(this,TSMCollation,TSMObject,DoSetCursor)
  372.     (this,ev,mousePos,rgnClass,offset,isLeftHand,theEvent);
  373. }
  374.  
  375. /* method: ReleaseInlineHoles */
  376. OSStatus   ReleaseInlineHoles(Environment *ev)
  377. {
  378.    return SOM_ResolveD(this,TSMCollation,TSMObject,ReleaseInlineHoles)
  379.     (this,ev);
  380. }
  381.  
  382. /* method: TerminateInput */
  383. OSStatus   TerminateInput(Environment *ev)
  384. {
  385.    return SOM_ResolveD(this,TSMCollation,TSMObject,TerminateInput)
  386.     (this,ev);
  387. }
  388.  
  389. /* method: somInit */
  390. void   somInit()
  391. {
  392.    SOM_ResolveD(this,TSMCollation,SOMObject,somInit)
  393.     (this);
  394. }
  395.  
  396. /* method: somUninit */
  397. void   somUninit()
  398. {
  399.    SOM_ResolveD(this,TSMCollation,SOMObject,somUninit)
  400.     (this);
  401. }
  402.  
  403. /* method: somDuplicateReference */
  404. SOMObject*   somDuplicateReference()
  405. {
  406.    return SOM_ResolveD(this,TSMCollation,SOMObject,somDuplicateReference)
  407.     (this);
  408. }
  409.  
  410. /* method: somCompareReference */
  411. boolean   somCompareReference(SOMObject* anObject)
  412. {
  413.    return SOM_ResolveD(this,TSMCollation,SOMObject,somCompareReference)
  414.     (this,anObject);
  415. }
  416.  
  417. /* method: somRelease */
  418. SOMObject*   somRelease()
  419. {
  420.    return SOM_ResolveD(this,TSMCollation,SOMObject,somRelease)
  421.     (this);
  422. }
  423.  
  424. /* method: somFree */
  425. void   somFree()
  426. {
  427.    SOM_ResolveD(this,TSMCollation,SOMObject,somFree)
  428.     (this);
  429. }
  430.  
  431. /* method: somCanDelete */
  432. boolean   somCanDelete()
  433. {
  434.    return SOM_ResolveD(this,TSMCollation,SOMObject,somCanDelete)
  435.     (this);
  436. }
  437.  
  438. /* method: somGetClass */
  439. SOMClass*   somGetClass()
  440. {
  441.    return SOM_ResolveD(this,TSMCollation,SOMObject,somGetClass)
  442.     (this);
  443. }
  444.  
  445. /* method: somGetClassName */
  446. corbastring   somGetClassName()
  447. {
  448.    return SOM_ResolveD(this,TSMCollation,SOMObject,somGetClassName)
  449.     (this);
  450. }
  451.  
  452. /* method: somGetSize */
  453. long   somGetSize()
  454. {
  455.    return SOM_ResolveD(this,TSMCollation,SOMObject,somGetSize)
  456.     (this);
  457. }
  458.  
  459. /* method: somIsA */
  460. boolean   somIsA(SOMClass* aClassObj)
  461. {
  462.    return SOM_ResolveD(this,TSMCollation,SOMObject,somIsA)
  463.     (this,aClassObj);
  464. }
  465.  
  466. /* method: somRespondsTo */
  467. boolean   somRespondsTo(somId mId)
  468. {
  469.    return SOM_ResolveD(this,TSMCollation,SOMObject,somRespondsTo)
  470.     (this,mId);
  471. }
  472.  
  473. /* method: somIsInstanceOf */
  474. boolean   somIsInstanceOf(SOMClass* aClassObj)
  475. {
  476.    return SOM_ResolveD(this,TSMCollation,SOMObject,somIsInstanceOf)
  477.     (this,aClassObj);
  478. }
  479.  
  480. /* va_list method: somDispatch */
  481. /* the va_list invocation form */
  482. boolean   TSMCollation_somDispatch(somToken* retValue,
  483.         somId methodId,
  484.         va_list ap)
  485. {
  486.    return SOM_ResolveD(this,TSMCollation,SOMObject,somDispatch)
  487.     (this,retValue,methodId,ap);
  488. }
  489.  
  490. /* the varargs invocation form */
  491. boolean   somDispatch(somToken* retValue,
  492.         somId methodId,
  493.         ...)
  494. {
  495.    va_list ap;
  496.    va_start(ap, methodId);
  497.       boolean __somResult = 
  498.       (boolean) SOM_ResolveD(this,TSMCollation,SOMObject,somDispatch)
  499.     (this,retValue,methodId,ap);
  500.    va_end(ap);
  501.    return __somResult;
  502. }
  503.  
  504. /* va_list method: somClassDispatch */
  505. /* the va_list invocation form */
  506. boolean   TSMCollation_somClassDispatch(SOMClass* clsObj,
  507.         somToken* retValue,
  508.         somId methodId,
  509.         va_list ap)
  510. {
  511.    return SOM_ResolveD(this,TSMCollation,SOMObject,somClassDispatch)
  512.     (this,clsObj,retValue,methodId,ap);
  513. }
  514.  
  515. /* the varargs invocation form */
  516. boolean   somClassDispatch(SOMClass* clsObj,
  517.         somToken* retValue,
  518.         somId methodId,
  519.         ...)
  520. {
  521.    va_list ap;
  522.    va_start(ap, methodId);
  523.       boolean __somResult = 
  524.       (boolean) SOM_ResolveD(this,TSMCollation,SOMObject,somClassDispatch)
  525.     (this,clsObj,retValue,methodId,ap);
  526.    va_end(ap);
  527.    return __somResult;
  528. }
  529.  
  530. /* method: somCastObj */
  531. boolean   somCastObj(SOMClass* cls)
  532. {
  533.    return SOM_ResolveD(this,TSMCollation,SOMObject,somCastObj)
  534.     (this,cls);
  535. }
  536.  
  537. /* method: somResetObj */
  538. boolean   somResetObj()
  539. {
  540.    return SOM_ResolveD(this,TSMCollation,SOMObject,somResetObj)
  541.     (this);
  542. }
  543.  
  544. /* method: somPrintSelf */
  545. SOMObject*   somPrintSelf()
  546. {
  547.    return SOM_ResolveD(this,TSMCollation,SOMObject,somPrintSelf)
  548.     (this);
  549. }
  550.  
  551. /* method: somDumpSelf */
  552. void   somDumpSelf(long level)
  553. {
  554.    SOM_ResolveD(this,TSMCollation,SOMObject,somDumpSelf)
  555.     (this,level);
  556. }
  557.  
  558. /* method: somDumpSelfInt */
  559. void   somDumpSelfInt(long level)
  560. {
  561.    SOM_ResolveD(this,TSMCollation,SOMObject,somDumpSelfInt)
  562.     (this,level);
  563. }
  564.  
  565. };   /* TSMCollation */
  566.  
  567.  
  568.  
  569. #endif       /* SOM_TSMCollation_xh */
  570.